﻿#region

using System;
using HouseHoldBudget.Core.Configuration;
using HouseHoldBudget.Core.Infrastructure.DependencyManagement;

#endregion

namespace HouseHoldBudget.Core.Infrastructure
{
    /// <summary>
    ///   Classes implementing this interface can serve as a portal for the various services composing the HouseHoldBudget engine. Edit functionality, modules and implementations access most HouseHoldBudget functionality through this interface.
    /// </summary>
    public interface IEngine
    {
        #region Instance Properties

        ContainerManager ContainerManager { get; }

        #endregion

        #region Instance Methods

        /// <summary>
        ///   Initialize components and plugins in the nop environment.
        /// </summary>
        /// <param name="config"> Config </param>
        void Initialize(HouseHoldBudgetConfig config);

        T Resolve<T>() where T : class;

        object Resolve(Type type);

        T[] ResolveAll<T>();

        #endregion
    }
}